<template>
  <div class="dialog">
    <el-dialog
      :title="dialog.title"
      :close-on-click-modal="false"
      :close-on-press-escape="false"
      :modal-append-to-body="false"
      :visible.sync="dialog.show"
    >
      <el-form label-width="100px" ref="PmdForm" :model="PmdForm">
        <el-form-item label="序号：" prop="id">
          <el-input
            placeholder="请输入跑马灯id"
            v-model="PmdForm.id"
          ></el-input>
        </el-form-item>
        <el-form-item label="类型：" prop="type">
          <el-input
            placeholder="请输入跑马灯类型"
            v-model="PmdForm.type"
          ></el-input>
        </el-form-item>
        <el-form-item label="内容：" prop="content">
          <el-input
            placeholder="请输入跑马灯内容"
            v-model="PmdForm.content"
          ></el-input>
        </el-form-item>
         <el-form-item label="起始时间:">
          <el-date-picker
            v-model="PmdForm.startime"
            type="datetime"
            value-format="timestamp"
            placeholder="选择玩家注册起始时间"
          ></el-date-picker>
          <span style="margin-left: 15px">结束时间：</span>
          <el-date-picker
            v-model="PmdForm.endtime"
            type="datetime"
            value-format="timestamp"
            placeholder="选择玩家注册结束时间"
          ></el-date-picker>
        </el-form-item>
      </el-form>
      <span slot="footer" class="dialog-footer">
        <el-button @click="handleClose()">取 消</el-button>
        <el-button type="primary" @click="handleAndEdit()">确定</el-button>
      </span>
    </el-dialog>
  </div>
</template>
<script>
export default {
  name: "PmdDialog",
  // 获取父亲传过来的值
  props: {
    dialog: Object,
    PmdForm:Object
  },
  data() {
    return {
     
    };
  },
  methods: {
    handleAndEdit() {
      this.$emit("update", this.PmdForm);
      this.dialog.show = false;
    },
    handleClose() {
      this.dialog.show = false;
    },
  },
};
</script>
<style scoped>
</style>